home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 458 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  5.8 KB

  1. Subject: Re: Bug report. MiNT 1.07.
  2. Date: Sat, 28 Aug 93 2:01:20 CES
  3. From: Juergen Lock <nox@jelal.north.de>
  4. In-Reply-To: <428.9308261557@earth.ox.ac.uk>; from "Stephen Usher" at Aug 26, 93 4:57 pm
  5. Message-Id: <9308280001.AA00720@jelal.north.de>
  6.  
  7. Stephen Usher writes:
  8.  
  9. > Just a quick bug report, I've not time for anything more.
  10. > Machine:- TT030, 8MB RAM (4+4), standard TT Hard drive + ICD adaptor and
  11. > 85MB seagate drive on ACSI bus.
  12. > (1) When opening serial ports modem2, serial1 and serial2, modem1 is opened.
  13.  
  14.  hmm haven't seen that one...  actually my uucico (taylor 1.03) just
  15. received this mail over modem2, without any problems.  this is MiNT 1.09...
  16. > I noticed this the other day when I tried to use my own port of Kermit
  17. > 5A(188).
  18.  
  19.  btw is it available for ftp/whatever? :)
  20.  
  21. > (2) When MiNT is rebooted after successfully exiting, system soft-crashes.
  22.  
  23.  if you mean exit MiNT -> desktop -> run MiNT again (i.e. without reset)
  24. i think i just found the reason:  close on /dev/fasttext didn't fix
  25. the cursor address to point into the original screen memory again...
  26. and while i was at it i also made open work more than once and fixed a
  27. `strangely' flashing cursor when it was on before the open.  (btw the
  28. scr_usecnt is necessary because /dev/console and fasttext use the same
  29. tty struct...)
  30.  
  31.  and after that i have a few patches for init, login, passwd etc :-)
  32.  
  33. Index: dosmem.c
  34. --- dosmem.c_    Tue Aug 17 18:36:24 1993
  35. +++ dosmem.c    Mon Aug 23 16:45:16 1993
  36. @@ -1294,7 +1294,10 @@
  37.      sigmask = curproc->sigmask;
  38.      curproc->sigmask = ~((unsigned long)1 << SIGKILL);
  39.  
  40. +    { short sr = spl7();
  41.      add_q(READY_Q, p);        /* put it on the ready queue */
  42. +    spl(sr);
  43. +    }
  44.      sleep(WAIT_Q, (long)p);            /* while we wait for it */
  45.      TRACE(("do_vfork: parent waking up"));
  46.  
  47.  (not sure if this was necessary, just in case...)
  48.  
  49. Index: fasttext.c
  50. --- fasttext.c_    Tue Aug 17 11:11:16 1993
  51. +++ fasttext.c    Wed Aug 25 17:06:24 1993
  52. @@ -20,6 +20,7 @@
  53.  #define CONDEV    (2)
  54.  
  55.  static SCREEN *current;
  56. +static short scr_usecnt;
  57.  
  58.  static void paint P_((SCREEN *, int, char *)),
  59.       paint8c P_((SCREEN *, int, char *)),
  60. @@ -171,11 +172,13 @@
  61.          if (hardbase == 0) {
  62.              ALERT("Insufficient memory for hardware scrolling!");
  63.          } else {
  64. +            v->curstimer = 0x7f;
  65.              quickmove(hardbase, base, scrnsize);
  66.              v->cursaddr = v->cursaddr + (hardbase - base);
  67.              oldbase = base;
  68.              base = hardbase;
  69.              Setscreen(hardbase, hardbase, -1);
  70. +            v->curstimer = v->period;
  71.          }
  72.      }
  73.      hardline = 0;
  74. @@ -214,7 +217,9 @@
  75.          v->flags &= ~CURS_FSTATE;
  76.  
  77.      /* now turn the cursor on the way we like it */
  78. +        v->curstimer = v->period;
  79.          v->hidecnt = 0;
  80. +        v->flags |= CURS_ON;
  81.          curs_on(v);
  82.      } else {
  83.          (void)Cursconf(0,0);
  84. @@ -1201,8 +1206,13 @@
  85.  
  86.      if (!current) {
  87.          init();
  88. -    } else
  89. +    }
  90. +#if 1
  91. +    ++scr_usecnt;
  92. +#else
  93. +    else
  94.          return EACCDN;        /* screen in use */
  95. +#endif
  96.  
  97.      f->flags |= O_TTY;
  98.      return 0;
  99. @@ -1213,13 +1223,21 @@
  100.      FILEPTR *f;
  101.      int pid;
  102.  {
  103. +    SCREEN *v = current;
  104.      UNUSED(pid);
  105.  
  106. -    if (f->links <= 0) {
  107. +#if 1
  108. +    if (v && f->links <= 0 && !--scr_usecnt) {
  109. +#else
  110. +    if (v && f->links <= 0) {
  111. +#endif
  112.          if (hardbase) {
  113. +            v->curstimer = 0x7f;
  114. +            v->cursaddr = v->cursaddr + (oldbase - base);
  115.              quickmove(oldbase, base, scrnsize);
  116.              base = oldbase;
  117.              Setscreen(oldbase, oldbase, -1);
  118. +            v->curstimer = v->period;
  119.          }
  120.          current = 0;
  121.      }
  122.  
  123. -------end mint patches----
  124.  
  125.  this makes the tty always get the right pgrp:
  126.  
  127. Index: init/init.c
  128. --- /i/tmp/init/init.c    Mon Aug  2 23:58:08 1993
  129. +++ /f/msrc/ini11/init/init.c    Tue Aug 24 13:14:56 1993
  130. @@ -44,6 +44,7 @@
  131.  #include <sys/resource.h>
  132.  
  133.  #ifdef MINT
  134. +#include <ioctl.h>
  135.  #include <sys/dir.h>
  136.  #include <mintbind.h>
  137.  
  138. @@ -493,12 +494,17 @@
  139.  
  140.      if ((pid = vfork()) == 0)
  141.      {
  142. -        setpgrp(getpid(), getpid());
  143. +        long pgrp = setpgrp(getpid(), getpid());
  144.  
  145.          tty = open(ttyname, O_RDWR);
  146.  
  147.  #ifdef MINT
  148. +        if (tty == -1 || pgrp < 0) {
  149. +            perror(ttyname);
  150. +            _exit(0);
  151. +        }
  152.          dup2(tty, -1);        /* set controlling terminal */
  153. +        ioctl (-1, TIOCSPGRP, &pgrp);
  154.  #endif
  155.          dup2(tty, 0);
  156.          dup2(tty, 1);
  157.  
  158.  i think the next ones are also the reason why login crashed for some
  159. people...
  160.  
  161. Index: login/login.c
  162. --- /i/tmp/login/login.c    Wed Aug  4 01:46:44 1993
  163. +++ /f/msrc/ini11/login/login.c    Tue Aug 24 11:34:44 1993
  164. @@ -384,7 +384,7 @@
  165.  
  166.      if (i < argc)
  167.      {
  168. -        if ((j = strlen(argv[i])) > 8)
  169. +        if ((j = strlen(argv[i])+1) > 8)
  170.              j = 8;
  171.          strncpy(name, argv[i], j);
  172.          name[8] = '\0';
  173. Index: login/passwd.c
  174. --- /i/tmp/login/passwd.c    Mon Aug  2 23:58:08 1993
  175. +++ /f/msrc/ini11/login/passwd.c    Tue Aug 24 11:28:32 1993
  176. @@ -202,7 +202,7 @@
  177.  
  178.      if (i < argc)
  179.      {
  180. -        if ((j = strlen(argv[i])) > 8)
  181. +        if ((j = strlen(argv[i])+1) > 8)
  182.              j = 8;
  183.          strncpy(name, argv[i], j);
  184.          name[8] = '\0';
  185. Index: login/su.c
  186. --- /i/tmp/login/su.c    Wed Aug  4 01:46:18 1993
  187. +++ /f/msrc/ini11/login/su.c    Tue Aug 24 11:34:52 1993
  188. @@ -298,7 +298,7 @@
  189.  
  190.      if (i < argc)
  191.      {
  192. -        if ((j = strlen(argv[i])) > 8)
  193. +        if ((j = strlen(argv[i])+1) > 8)
  194.              j = 8;
  195.          strncpy(name, argv[i], j);
  196.          name[8] = '\0';
  197.  
  198.  and getty restores tty on some more signals:
  199.  
  200. Index: getty/getty.c
  201. --- getty/getty.c_    Mon Aug  2 23:58:08 1993
  202. +++ getty/getty.c    Thu Aug 26 22:10:02 1993
  203. @@ -561,8 +561,12 @@
  204.      char *s = "Connection timed out.\r\n";
  205.  
  206.      ioctl(0, TIOCSETP, &save_sgttyb);
  207. -    write(0, s, strlen(s));
  208. -    exit(1);
  209. +    if (sig == SIGALRM) {
  210. +        write(0, s, strlen(s));
  211. +        exit(1);
  212. +    }
  213. +    signal (sig, SIG_DFL);
  214. +    kill (getpid(), sig);
  215.  }
  216.  
  217.  int
  218. @@ -582,6 +586,10 @@
  219.  
  220.      ioctl(0, TIOCGETP, &save_sgttyb);
  221.      signal(SIGALRM, do_alarm);
  222. +    signal(SIGHUP, do_alarm);
  223. +    signal(SIGINT, do_alarm);
  224. +    signal(SIGQUIT, do_alarm);
  225. +    signal(SIGTERM, do_alarm);
  226.  
  227.  #ifdef DEBUG
  228.      if ((dbgfp = fopen(DEBUGFILE, "w+")) == NULL)
  229.  
  230.  hope this helps some...  cheers,
  231.     Juergen
  232. -- 
  233. J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
  234.                                 ...ohne Gewehr
  235. PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 
  236.